﻿using Manon.Admin.Web.Application.Dtos.News;
using Manon.Core;
using Manon.Core.IOC;
using Manon.Repository.Collections;

namespace Manon.Admin.Web.Application
{
    public interface INewsService : IScopeDependency
    {
        #region 资讯分类
        /// <summary>
        /// 获取资讯分类
        /// </summary>
        /// <param name="CategoryId"></param>
        /// <returns></returns>
        Task<NewsCategoryOutput> GetNewsCategory(int CategoryId);

        /// <summary>
        /// 获取资讯分类列表
        /// </summary>
        /// <returns></returns>
        Task<List<NewsCategoryOutput>> GetNewsCateogryList();

        /// <summary>
        /// 保存资讯分类
        /// </summary>
        /// <param name="Input"></param>
        /// <returns></returns>
        Task<Result> SaveNewsCategory(NewsCategoryInput Input);


        /// <summary>
        /// 设置资讯分类是否可用
        /// </summary>
        /// <param name="Input"></param>
        /// <returns></returns>
        Task<Result> SetNewsCategoryEnabled(int CategoryId, bool Enabled);

        #endregion

        #region 资讯
        /// <summary>
        /// 获取资讯
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<NewsOutput> GetNews(int Id);

        /// <summary>
        /// 获取资讯列表
        /// </summary>
        /// <param name="Input"></param>
        /// <returns></returns>
        Task<PagedList<NewsOutput>> GetNewsPagedList(GetNewsPagedListInput Input);

        /// <summary>
        /// 保存资讯 
        /// </summary>
        /// <param name="Input"></param>
        /// <returns></returns>
        Task<Result> SaveNews(NewsInput Input);


        /// <summary>
        /// 设置资讯是否可用
        /// </summary>
        /// <param name="Input"></param>
        /// <returns></returns>
        Task<Result> SetNewsEnabled(int Id, bool Enabled);
        #endregion

    }
}
